package cn.xrj.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ClientConfigController {
    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${server.port}")
    private String port;

    @Value("${eureka.instance.instance-id}")
    private String instanceId;

    @GetMapping("/clientconfig/getconfig")
    public String getConfig(){
        return "applicationName:"+applicationName+"\nport:"+port+"\ninstanceId"+instanceId;
    }
}
